import { createRouter, createWebHistory } from 'vue-router'
import index from '../views/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      meta: {
        title: '首页',
        noNeedLogin: true, // 不需要登录的页面
      },
      children: [

      ]
    },
    {
      path: '/message',
      name: 'message',
      component: () => import('../views/message.vue'),
      meta: {
        title: '消息通知',
        noNeedLogin: true, // 不需要登录的页面
      },
      children: [

      ]
    },
    {
      path: '/userInfo',
      name: 'userInfo',
      component: () => import('../views/userInfo.vue'),
      meta: {
        title: '举报',
        noNeedLogin: true, // 不需要登录的页面
      },
      children: [

      ]
    },
    {
      path: '/report',
      name: 'report',
      component: () => import('../views/report.vue'),
      meta: {
        title: '举报',
        noNeedLogin: true, // 不需要登录的页面
      },
      children: [

      ]
    },

    {
      path: '/goodDetail',
      name: 'goodsDetail',
      component: () => import('../views/goodsDetail.vue'),
      meta: {
        title: '商品详情',
        noNeedLogin: true, // 不需要登录的页面
      },
    },
    {
      path: '/toOrder',
      name: 'toOrder',
      component: () => import('../views/toOrder.vue'),
      meta: {
        title: '商品详情',
        noNeedLogin: true, // 不需要登录的页面
      },

    },
    {
      path: '/shopReg',
      name: 'shopReg',
      component: () => import('../views/shopReg.vue'),
      meta: {
        title: '店铺详情',
        noNeedLogin: true, // 不需要登录的页面
      },

    },
    {
      path: '/shopInfo',
      name: 'shopInfo',
      component: () => import('../views/shopInfo.vue'),
      meta: {
        title: '店铺详情',
        noNeedLogin: true, // 不需要登录的页面
      },

    },
    {
      path: '/shopMessge',
      name: 'shopMessge',
      component: () => import('../views/shopMessge.vue'),
      meta: {
        title: '店铺详情',
        noNeedLogin: true, // 不需要登录的页面
      },

    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login.vue'),
      meta: {
        title: '登陆'
      }
    },
  ]
})
console.log("router", router)
export default router
